package com.uifp.gradebook.adaptors;

import com.uifp.gradebook.VSCActualFragment;
import com.uifp.gradebook.VSCProjectedFragment;
import com.uifp.gradebook.VSCTargetFragment;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
 
public class TabsPagerAdapter extends FragmentPagerAdapter {
 
	private Bundle data;
    public TabsPagerAdapter(FragmentManager fm, Bundle bundle) {
        super(fm);
        data = bundle;
    }

    @Override
    public Fragment getItem(int index) {
 
        switch (index) {
        case 0:
            // Top Rated fragment activity
        	Fragment f = new VSCActualFragment();
        	f.setArguments(data);	//add the CLASS_ID to the bundle
            return f;
        case 1:
            // Games fragment activity
        	Fragment g = new VSCProjectedFragment();
        	g.setArguments(data);	//add the CLASS_ID to the bundle
            return g;
        case 2:
            // Movies fragment activity
        	Fragment h = new VSCTargetFragment();
        	h.setArguments(data);	//add the CLASS_ID to the bundle
            return h;
        }
 
        return null;
    }
 
    @Override
    public int getCount() {
        // get item count - equal to number of tabs
        return 3;
    }
 
}
